package 酒店管理系统模拟.test02;

import java.util.Scanner;

public class HotelMgtSystem {
    public static void main(String[] args) {
        Hotel hotel = new Hotel();
        System.out.println("欢迎使用本系统，请认真阅读以下说明" + "\n" + "请输入对应的功能编号对应功能：【1】表示查看房间列表。【2】表示订房。【3】表示退房。【0】表示退出。");
        Scanner s = new Scanner(System.in);
        while(true) {
            System.out.print("请输入对应编号：");
            int i = s.nextInt();
            if (i == 1) {
                hotel.print();
            } else if (i == 2) {
                System.out.print("请输入订房房间编号：");
                int roomNo = s.nextInt();
                hotel.order(roomNo);
            } else if (i == 3) {
                System.out.print("请输入退房房间编号：");
                int roomNo = s.nextInt();
                hotel.exit(roomNo);
            } else if (i == 0) {
                System.out.println("再见，很高兴为您服务！");
                return;
            } else {
                System.out.println("出错啦！");
            }
        }

    }
}
